package com.gmail.shazi199.satoriex.utils;

import java.io.IOException;
import java.util.Properties;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.gmail.shazi199.satoriex.App;

public class TextReader {

    private static final Log LOGGER = LogFactory.getLog(TextReader.class);

    private static Properties res;

    static {
        try {
            res = new Properties();
            res.load(App.class.getResourceAsStream("resource/text.properties"));
        } catch (IOException e) {
            LOGGER.error("Load Text Resource Error.", e);
            App.getApp().exit();
        }
    }

    private TextReader() {
    }

    public static String getString(String key) {
        return res.getProperty(key);
    }
}
